﻿using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using MongoDB.Driver.Builders;
using MongoDB.Bson;

namespace nMongo
{
    public partial class MongoEngine
    {
        #region Protected Properties
        protected string _connectionString { get; set; }
        protected MongoServer _server { get; set; }
        protected MongoUrlBuilder _builder { get; set; }
        #endregion

        #region Public Properties
        /// <summary>
        /// Connection string of the current database.
        /// </summary>
        public string ConnectionString
        {
            get { return _connectionString; }
            set { _BuildConnectionString(value); }
        }

        /// <summary>
        /// Actual database object.
        /// </summary>
        public MongoDatabase Database { get; protected set; }


        public MongoEngineOptions Options { get; set; }
        #endregion
    }
}
